<template>
  <div>
    <el-checkbox-group
      v-model="model.BloodTransfusionList"
      @change="handlerCheckBox"
    >
      <el-checkbox label="2">无</el-checkbox>
      <el-checkbox label="1">有</el-checkbox>
      <label>
        <span class="el-checkbox__label fontColor">原因</span>
      </label>
      <el-input v-model="model.BloodTransfusionName" style="width:120px" />
      <label>
        <span class="el-checkbox__label fontColor">输血时间</span>
      </label>
      <el-input v-model="model.BloodTransfusionDate" style="width:120px" />
    </el-checkbox-group>
  </div>
</template>

<script>
export default {
  props: {
    model: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {}
  },
  methods: {
    handlerCheckBox(value) {
      if (this.model.BloodTransfusionList.length > 1) {
        this.model.BloodTransfusionList.splice(0, 1)
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.fontColor {
  color: #606266;
  font-weight: 500;
  margin-right: 30px;
}
</style>
